var a = getApp();

Page({
    data: {
        diy_name: "律师平台",
        is_lawyer: !1,
        is_lawyer_firm: !1,
        is_merchant: !1,
        set: {},
        member: {}
    },
    onLoad: function(a) {
        this.getData();
    },
    getData: function() {
        var e = this, t = a.getNetAddresss("plugin.lawyer-platform.frontend.controllers.index.index");
        a._getNetWork({
            url: t,
            success: function(a) {
                if (1 == a.data.result) {
                    var t = a.data.data;
                    e.setData({
                        is_lawyer: t.is_lawyer,
                        is_lawyer_firm: t.is_lawyer_firm,
                        is_merchant: t.is_merchant,
                        diy_name: "律师平台",
                        member: t.member
                    }), wx.setNavigationBarTitle({
                        title: t ? t.set.diy_name : "律师平台"
                    });
                }
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    to: function(a) {
        var e = a.currentTarget.dataset.url, t = a.currentTarget.dataset.type;
        "order" == e && wx.navigateTo({
            url: "/packageI/lawyerPlatform/order/order?order_type=member"
        }), "message" == e && wx.navigateTo({
            url: "/packageI/lawyerPlatform/chat/chat?message_type=1"
        }), "office" == e && (this.data.is_lawyer_firm ? wx.navigateTo({
            url: "/packageI/lawyerPlatform/manage/manage?type=" + t
        }) : wx.navigateTo({
            url: "/packageI/lawyerPlatform/info/info?type=office"
        })), "management" == e && (this.data.is_lawyer ? wx.navigateTo({
            url: "/packageI/lawyerPlatform/manage/manage?type=" + t
        }) : wx.navigateTo({
            url: "/packageI/lawyerPlatform/info/info?type=lawyer"
        })), "operators" == e && wx.navigateTo({
            url: "/packageI/lawyerPlatform/operators/operators"
        }), "enterprise" == e && wx.navigateTo({
            url: "/packageI/lawyerPlatform/enterprise/enterprise"
        });
    },
    onShareAppMessage: function() {}
});